var express = require('express');
const multer = require('multer')
const upload = multer({ dest: 'public/uploads/' })

var studentController = require('../controllers/studentController');
var router = express.Router();

router.post('/adminapi/students/login', studentController.login);

router.post('/adminapi/students', studentController.addList);

router.get('/adminapi/students', studentController.getList);

router.put('/adminapi/students/:id', studentController.update);

router.post('/adminapi/students/:id/upload', upload.single('file'), studentController.upload);

router.delete('/adminapi/students', studentController.delete);

module.exports = router;